<!--@Knockout-->
<div data-bind="dxButton: { onClick: togglePopup, text: 'Show popup' }"></div>
<div class="dx-fieldset">
    <div class="dx-field">
        <div class="dx-field-label">my</div>
        <div class="dx-field-value" data-bind="dxSelectBox: { 
            dataSource: positionValues,
            value: myValue
        }"></div>
    </div>
    <div class="dx-field">
        <div class="dx-field-label">at</div>
        <div class="dx-field-value" data-bind="dxSelectBox: { 
            dataSource: positionValues,
            value: atValue
        }"></div>
    </div>
</div>
<div id="targetElement"></div>
<div data-bind="dxPopup: {
    height: 120,
    width: 150,
    shading: false,
    showTitle: false,
    closeOnOutsideClick: true,
    visible: visible,
    position: {
        my: myValue,
        at: atValue,
        of: '#targetElement'
    }
}">
    <div data-options="dxTemplate: { name: 'content' }">
        <p>The popup text.</p>
        <div data-bind="dxButton: { text: 'Hide popup', onClick: togglePopup }"></div>
    </div>
</div>

<!--/@Knockout-->
<!--@AngularJS-->
<div ng-controller="demoController" style="height: 100%;">
    <div dx-button="{ onClick: togglePopup, text: 'Show popup' }"></div>
    <div class="dx-fieldset">
        <div class="dx-field">
            <div class="dx-field-label">my</div>
            <div class="dx-field-value" ng-model="myValue" dx-select-box="{
                dataSource: positionValues
            }"></div>
        </div>
        <div class="dx-field">
            <div class="dx-field-label">at</div>
            <div class="dx-field-value" ng-model="atValue" dx-select-box="{
                dataSource: positionValues
            }"></div>
        </div>
    </div>
    <div id="targetElement"></div>
    <div dx-popup="{
        height: 120,
        width: 150,
        shading: false,
        showTitle: false,
        closeOnOutsideClick: true,
        position: {
            of: '#targetElement'
        },
        bindingOptions: {
            visible: 'visible',
            'position.my': 'myValue',
            'position.at': 'atValue'
        }
    }">
        <div data-options="dxTemplate: { name: 'content' }">
            <p>The popup text.</p>
            <div dx-button="{ text: 'Hide popup', onClick: togglePopup }"></div>
        </div>
    </div>
</div>
<!--/@AngularJS-->
<!--@jQuery-->
<div id="toggleButton"></div>
<div class="dx-fieldset">
    <div class="dx-field">
        <div class="dx-field-label">my</div>
        <div class="dx-field-value" id="mySelector"></div>
    </div>
    <div class="dx-field">
        <div class="dx-field-label">at</div>
        <div class="dx-field-value" id="atSelector"></div>
    </div>
</div>
<div id="targetElement"></div>
<div id="myPopup"></div>
<!--/@jQuery-->